home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / gr564s.zip / SRC / MS / DIRENT.H < prev    next >
C/C++ Source or Header  |  1993-08-27  |  1KB  |  54 lines

  1. /*
  2.  *  dirent.h - POSIX directory access routines for MS-DOS, OS/2 and Windows/NT
  3.  *
  4.  *  Author: Frank Whaley (few@autodesk.com)
  5.  *
  6.  *  Copyright Frank Whaley 1993.  All rights reserved.
  7.  *
  8.  *  Permission to use, copy, modify, distribute, and sell this software
  9.  *  and its documentation for any purpose is hereby granted without fee,
  10.  *  provided that the above copyright notice appears in all copies of the
  11.  *  source code.  The name of the author may not be used to endorse or
  12.  *  promote products derived from this software without specific prior
  13.  *  written permission.
  14.  *
  15.  *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  16.  *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  17.  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  *  Read the "CAVEATS" section in dirent.c.
  20.  */
  21.  
  22. #ifndef __DIRENT_H
  23. #define __DIRENT_H
  24.  
  25. #if defined(__OS2__) || defined(__NT__)
  26. #define d_MAXNAMLEN 255
  27. #else
  28. #define d_MAXNAMLEN 12
  29. #endif
  30.  
  31. typedef struct __DIRENT DIR;
  32.  
  33. struct dirent
  34. {
  35.  char d_name[d_MAXNAMLEN + 1];
  36. };
  37.  
  38. DIR *opendir(char const *__name);
  39. struct dirent *readdir(DIR *__dir);
  40. void rewinddir(DIR *__dir);
  41. int closedir(DIR *__dir);
  42.  
  43. void __seekdir(DIR *__dir, long __pos);
  44. long __telldir(DIR *__dir);
  45.  
  46. #ifndef _POSIX_SOURCE
  47. #define seekdir __seekdir
  48. #define telldir __telldir
  49. #endif
  50.  
  51. #endif /*__DIRENT_H*/
  52.  
  53. /*  END of dirent.h  */
  54.